<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/6/15
 * Time: 15:45
 */

namespace Home\Controller;

use Think\Controller;

class WxpayController extends Controller{

        /* 修改订单状态 */
        public function notify()
        {
            $condition['openid'] = $_GET['openid'];
            $condition['pay_sn'] = $_GET['pay_sn'];
            if(M('order')->where($condition)->save(array('status'=>20))){
                M('tickets')->where(array('order_id'=>2))->setDec('num',1);
            }
        }
}